package com.wing.warehouse.controller.admin.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.common.utils.JsonResult;
import com.wing.warehouse.model.entity.WarehouseFactoryShelfSpaceEntity;
import com.wing.warehouse.model.entity.WarehouseFactoryShelfSpaceVO;
import com.wing.warehouse.model.request.WarehouseFactoryShelfSpaceForm;

import java.util.List;
import java.util.Map;

/**
 * 仓库货架货位-Service
 *
 * @author
 */
public interface WarehouseFactoryShelfSpaceService extends IService<WarehouseFactoryShelfSpaceEntity> {

    /**
     * 添加
     *
     * @param warehouseShelfSpaceForm
     * @return
     */
    int add(WarehouseFactoryShelfSpaceForm warehouseShelfSpaceForm);

    List<WarehouseFactoryShelfSpaceVO> selectFactoryCount(List<Long> ids);

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<WarehouseFactoryShelfSpaceVO> list4app(Map<String, Object> params);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<WarehouseFactoryShelfSpaceVO> pageList4app(Page page, Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    WarehouseFactoryShelfSpaceVO get4appById(Long id);

    int disableByShelfId( Long shelfId);

    int updateShelfSpaceById(WarehouseFactoryShelfSpaceEntity warehouseShelfSpace);

    WarehouseFactoryShelfSpaceVO findByCode(String code);

    /**
     * 查询采购入库产品库位
     * @param skuCode
     * @param warehouseId
     * @return
     */
    List<WarehouseFactoryShelfSpaceVO> getShelfSpace(String skuCode, Long warehouseId);

    /**
     * 添加平行库位
     *
     * @param warehouseShelfFlatSpaceForm 仓库货架平面空间形式
     * @return int
     */
    JsonResult addFlat(WarehouseFactoryShelfSpaceForm warehouseShelfFlatSpaceForm);

    List<WarehouseFactoryShelfSpaceEntity> selectProductSpace(String id);
}
